body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
  color: #333;
}

.main-content {
  margin: 100px 0 200px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-container {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.cart-header {
  display: grid;
  grid-template-columns: 20px 30px 1.5fr 1fr 1fr 1fr 1fr;
  background-color: #f4efd2;
  padding: 15px 20px;
  font-weight: bold;
  border-bottom: 1px solid #e0e0e0;
  align-items: center;
}

.header-item {
  text-align: center;
}

.header-product {
  text-align: left;
  padding-left: 15px;
  grid-column: 3;
}

.cart-items {
  background-color: white;
}

.cart-item {
  display: grid;
  grid-template-columns: 20px 30px 1.5fr 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.cart-item:last-child {
  border-bottom: none;
}

.item-info {
  display: flex;
  align-items: center;
  text-align: left;
  grid-column: 3;
}

.item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  margin-right: 15px;
  border-radius: 4px;
}

.item-name {
  font-weight: 500;
}

.item-price {
  text-align: center;
  color: #e53935;
  font-weight: 500;
  grid-column: 4;
}

.item-quantity {
  text-align: center;
  grid-column: 5;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  justify-content: center;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  background-color: #f5f5f5;
  border: none;
  font-size: 16px;
  cursor: pointer;
  outline: none;
}

.quantity-btn:hover {
  background-color: #e0e0e0;
}

.quantity-input {
  width: 40px;
  height: 28px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  outline: none;
}

.item-subtotal {
  text-align: center;
  color: #e53935;
  font-weight: 500;
  grid-column: 6;
}

.item-action {
  text-align: center;
  grid-column: 7;
}

.remove-btn {
  background-color: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
}

.remove-btn:hover {
  color: #e53935;
}

.cart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f4efd2;
  border-top: 1px solid #e0e0e0;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.total-info {
  font-size: 16px;
  color: #333;
}

.total-info span {
  font-size: 16px;
}

#total-price {
  color: #e53935;
  font-size: 20px;
  font-weight: bold;
}

.checkout-btn {
  padding: 10px 30px;
  background-color: #e53935;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.checkout-btn:hover {
  background-color: #c62828;
}

.stock-warning {
  color: #e53935;
  font-size: 12px;
  margin-top: 5px;
}

.disabled-btn {
  background-color: #cccccc !important;
  cursor: not-allowed !important;
}

.quantity-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.item-checkbox {
  display: flex;
  justify-content: center;
  grid-column: 1;
}

.select-all-checkbox {
  width: 18px;
  height: 18px;
}

.select-all-text {
  font-size: 14px;
}

.item-select-checkbox {
  width: 20px;
  height: 20px;
}

.error {
  color: #e53935;
  text-align: center;
  padding: 10px;
  grid-column: 1 / -1;
}

/* 推荐商品样式 */
.content-down {
  margin-top: 100px;
  padding: 40px;
  background-color: #f9f7e8;
  border-radius: 8px;
}

.recommend-title {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 30px;
  color: #333;
  font-size: 24px;
}

.recommend-products {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.product-card {
  width: 20%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  padding: 10px;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 15px;
}

.product-name {
  font-size: 16px;
  margin-bottom: 8px;
  color: #333;
}

.product-price {
  color: #e74c3c;
  font-weight: bold;
  margin-bottom: 8px;
}

.product-stock {
  color: #666;
  font-size: 14px;
  margin-bottom: 12px;
}

.add-to-cart-btn {
  width: 100%;
  padding: 8px 0;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
  background-color: #2980b9;
}
